<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/views/global/taglibs.jsp" %>
<style type="text/css">
	.main-md DIV.form-group{border-bottom: 1px dashed #ddd;}
	.grid .g-u {
	   display:inline-block
	}
	.maincontent{background: #e4e7ea;} 
	.text-muted {
	    text-transform: uppercase;
    }
    .results-list .media {
    border-bottom: 1px solid #eee;
	}
	.results-list .media-object {
	    width: 125px;
	    margin-right: 10px;
	}
	.results-list .filename {
	    margin: 0;
	    font-size: 16px;
	}
	.results-list .media-body {
	    line-height: 18px;
	}
</style>
<div class="main">      
	<div class="row">
		<div class="col-md-12">
			<form id="itemForm" class="form-horizontal" role="form" name="itemForm"  method="post">
			<div class="panel panel-default">
				<div class="panel-heading">
					<div class="panel-title">Designer搜索</div>
				</div>
				<div class="panel-body">
					<div class="form-group">
					    <label class="col-sm-1 control-label" for="disType">是否选中: </label>
						<div class="col-sm-3">
							<select id="display" name="display" class="form-control" data-placeholder="是否选中" value="${queryParamVo.display }">
			                         <option value="">请选择</option>
			                         <option value="1" <c:if test="${queryParamVo.display eq 1 }">selected</c:if>  >选中</option>
			                         <option value="0" <c:if test="${queryParamVo.display eq 0 }">selected</c:if>  >未选中</option>
					         </select>
						</div>
						<label class="col-sm-2 control-label" for="sellerName">Designer名称: </label>
						
						<div class="col-sm-4">
							<input class="form-control" name="sellerName" id="sellerName" value="${queryParamVo.sellerName }"/>
						</div>
						<div class="col-sm-2">
							<button type="submit" class="btn btn-primary">搜 索</button>
						</div>
					</div>
				</div>
			</div>
			<pagination:pagenav pageInfo="${pageInfo }" url="${actionPath }" formName="itemForm" showTotalSize="true"></pagination:pagenav>
			</form>
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="results-list">
                     <div class="row">
                        <c:forEach var="entry" items="${entryList }">
                         <div class="media">
                           <div class="col-md-1">
                              <input type="checkbox" name="display" id="dispaly" <c:if test="${entry.display ge 1 }"> checked</c:if> onclick="check(this,'${entry.userId }')"/>
                           </div>
                           <div class="col-md-11">
                           	 <div class="row">
                           	 	<div class="col-xs-5">
                           	 		<a href="seller/sellerHome?sellerId=${entry.userId }"><img alt="" src="${fileServerBasePath }download/${entry.sellerFileId }" width="300" height="250"></a>
                           	 	</div>
                           	 	<div class="col-xs-7">
                           	 		<div class="text-muted">Designer名称: ${entry.sellerName }</div>
		                            <div class="text-muted">店铺地址: ${entry.strLocationNames }</div>
		                            <div class="text-muted">项目描述: ${entry.description }</div>
                           	 	</div>
                           	 </div>
                           </div>
                         </div>
                        </c:forEach>
                      </div>
                    </div><!-- results-list -->
                </div><!-- panel-body -->
            </div><!-- panel -->
     	</div><!-- col-sm-8 -->
     	
	</div>
</div>

<script type="text/javascript">
$(document).ready(function(){
	<c:if test="${empty message }">$(".alert").hide();</c:if>
	
});

function check(obj,id){
	var status=0;
	if(obj.checked){
		status=1;
	}
	$("#itemForm").goAjax({semantic: false, checkLogin: false,
		url: "admin/projectDesignerSelect/doCheckConfigSelect",
		data:{outerId: id,selectType:'select_designer',status:status},
		success: function(jsonData) {
		}
	});
}

function deleteNode(target, objId){
	$("#itemForm").goAjax({semantic: false, checkLogin: false,
		url: "admin/displayPicConfigList/doRemove",
		data:{id: objId},
		success: function(jsonData) {
			location.reload();
		}
	});
}

//图片按比例缩放
var flag=false;
function drawImage(ImgD,iwidth,iheight){
	//参数(图片,允许的宽度,允许的高度)
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0){
	flag=true;
	if(image.width/image.height>= iwidth/iheight){
	if(image.width>iwidth){ 
	ImgD.width=iwidth;
	ImgD.height=(image.height*iwidth)/image.width;
	}else{
	ImgD.width=image.width; 
	ImgD.height=image.height;
	}
	ImgD.alt=image.width+"×"+image.height;
	}
	else{
	if(image.height>iheight){ 
	ImgD.height=iheight;
	ImgD.width=(image.width*iheight)/image.height; 
	}else{
	ImgD.width=image.width; 
	ImgD.height=image.height;
	}
	ImgD.alt=image.width+"×"+image.height;
	}
	}
} 


</script>
